package com.ndp.fb.enums.ec;

/**
 * Created by hexin on 2016/5/20.
 */
public enum EcTemplateMaterielCreatedStatus {
    INIT(0),
    CreateIng(1),
    CreateEnd(2),
    Error(3);

    private int type;

    EcTemplateMaterielCreatedStatus(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    /**
     * 根据type获取EcTemplateMaterielCreateStatus
     *
     * @param type type
     * @return CheckActive
     */
    public static EcTemplateMaterielCreatedStatus getAdCreativeType(int type) {
        for (EcTemplateMaterielCreatedStatus c : EcTemplateMaterielCreatedStatus.values()) {
            if (c.type == type) {
                return c;
            }
        }
        return null;
    }

}
